<?php
declare (strict_types = 1);

namespace app\api\model;

/**
 * 市模型
 */
class City extends Base
{
    protected $autoWriteTimestamp = 'datetime';
    public static function getAllCity($data)
    {
        $data = City::where('province_code',$data['province_code'])->select();
        if(empty($data)){
            return [
                'code' => 200,
                'message' => '信息获取成功',
                'data' => []
            ];
        }
        return [
            'code' => 200,
            'message' => '信息获取成功',
            'data' => $data
        ];
    }
}